import { Entity, Column, Index } from 'typeorm';
import { BaseEntity } from '../../base/entity/base';

/**
 * 支付配置
 */
@Entity('pay_config')
export class PayConfigEntity extends BaseEntity {
  @Column({ comment: '支付方式名称' })
  name: string;

  @Column({ comment: '支付类型', dict: ['微信支付', '支付宝支付'], default: 0 })
  type: number;

  @Column({ comment: 'appid', nullable: true })
  appId: string;

  @Column({ comment: '商户号', nullable: true })
  mchId: string;

  @Column({ comment: 'ApiclientKey密钥', nullable: true })
  apiclient_key: string;

  @Column({ comment: 'ApiclientCert证书路径', nullable: true })
  apiclient_cert: string;

  @Column({ comment: '回调地址', nullable: true })
  notifyUrl: string;

  @Column({ comment: '启用状态', dict: ['禁用', '启用'], default: 1 })
  status: number;

  @Column({ comment: '默认状态', dict: ['禁用', '启用'], default: 1 })
  baseStatus: number;

  @Column({ comment: '排序号', default: 0 })
  orderNum: number;

  @Column({ comment: '备注信息', nullable: true })
  remark: string;
}
